const express = require("express");
const app = express();
const server = require('http').createServer(app);
const io = require('socket.io')(server);
const path = require("path");
io.on('connection', (socket) => {


    console.log("socket链接");

    socket.on("chatMsg",(data)=>{
        console.log(data);
        io.emit("severSend",data);
    })
 });
server.listen(3000);
app.use(express.static(path.join(__dirname,"www")))